﻿// (c) Norbert Huffschmid
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.

using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace SpinDotters.Core
{
    /// <summary>
    /// Container class for a collection of spinning controls
    /// </summary>
    public class SpinningControlContainer : Control
    {
        /// <summary>
        /// SpinningControlsBackground dependency property.
        /// </summary>
        public static readonly DependencyProperty SpinningControlsBackgroundProperty =
            DependencyProperty.Register(
                "SpinningControlsBackground",
                typeof(Brush),
                typeof(SpinningControlContainer),
                null);

        /// <summary>
        /// Get or sets the spinning controls background.
        /// </summary>
        public Brush SpinningControlsBackground
        {
            get { return (Brush)GetValue(SpinningControlsBackgroundProperty); }
            set { SetValue(SpinningControlsBackgroundProperty, value); }
        }

        /// <summary>
        /// SpinningControlsBorderBrush dependency property.
        /// </summary>
        public static readonly DependencyProperty SpinningControlsBorderBrushProperty =
            DependencyProperty.Register(
                "SpinningControlsBorderBrush",
                typeof(Brush),
                typeof(SpinningControlContainer),
                null);

        /// <summary>
        /// Get or sets the spinning controls border brush.
        /// </summary>
        public Brush SpinningControlsBorderBrush
        {
            get { return (Brush)GetValue(SpinningControlsBorderBrushProperty); }
            set { SetValue(SpinningControlsBorderBrushProperty, value); }
        }

        /// <summary>
        /// SpinningControlsBorderThickness dependency property.
        /// </summary>
        public static readonly DependencyProperty SpinningControlsBorderThicknessProperty =
            DependencyProperty.Register(
                "SpinningControlsBorderThickness",
                typeof(Thickness),
                typeof(SpinningControlContainer),
                null);

        /// <summary>
        /// Get or sets the spinning controls border thickness.
        /// </summary>
        public Thickness SpinningControlsBorderThickness
        {
            get { return (Thickness)GetValue(SpinningControlsBorderThicknessProperty); }
            set { SetValue(SpinningControlsBorderThicknessProperty, value); }
        }

        /// <summary>
        /// Reflective dependency property.
        /// </summary>
        public static readonly DependencyProperty ReflectiveProperty =
            DependencyProperty.Register(
                "Reflective",
                typeof(bool),
                typeof(SpinningControlContainer),
                null);

        /// <summary>
        /// Get or sets the reflective state.
        /// </summary>
        public bool Reflective
        {
            get { return (bool)GetValue(ReflectiveProperty); }
            set { SetValue(ReflectiveProperty, value); }
        }
    }
}
